<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="js/mui.min.js"></script>
		<link href="css/mui.min.css" rel="stylesheet" />
	</head>
	<body>
		<a href="logining.html">登录缓冲</a>
		<a href="information/information.html">个人信息</a>
		<a href="information/workinformation.html">工人信息</a>
		<a href="MyProfile/mypublishujob.html">发布工作</a>
		<a href="MyProfile/evaluation.html">互评</a>
		<a href="MyProfile/MyPublish.html">我的发布</a>
		<a href="MyProfile/rework.html">返工</a>
		<a href="publish/publish1.2.html">发布</a>
	</body>
	<script src="js/util.js"></script>
	<script type="text/javascript">
		var aniShow = {};
			mui.init({
				swipeBack: true //启用右滑关闭功能
			});
			mui.plusReady(function() {
				var self = plus.webview.currentWebview(),
					nviews = self.getSubNViews(),
					subpages = util.options.subpages,
					

				
				
				
				
				

				
			
				//创建子webview窗口 并初始化
				util.initSubpage();
				var activePage = plus.webview.currentWebview();

				//给每个view 添加监听点击切换
				for(var i = 0; i < 3; i++) {
					nviews[i].addEventListener('click', clickEvent, false);
				}

				// 自定义 tab 点击事件
				function clickEvent(e) {
					var currId = e.target.id,
						currIndex = parseInt(currId.substr(currId.length - 1, 1) - 1),
						currView = self.getStyle().subNViews[currIndex];
						
					// 匹配对应tab窗口	
					if(currIndex > 0){
						targetPage = plus.webview.getWebviewById(subpages[currIndex-1]);						
					}else {
						targetPage = plus.webview.currentWebview();
					}

					if(targetPage == activePage) {
						return;
					}

					
						//底部选项卡切换
						util.toggleNview(currView, currIndex);
						// 子页面切换
						util.changeSubpage(targetPage, activePage);
						//更改当前活跃的页面
						activePage = targetPage;
					
				}
			});
	</script>
</html>
